<include file="Member:header" />
<script type="text/javascript">
    $(function(){
        $('#verifyImg').click(function(){
            //重载验证码
            var timenow = new Date().getTime();
            $('#verifyImg').attr('src',"{:U('Member/verify',array('t'=>'"+timenow+"'))}");
            
        });
       $("#form1").ajaxForm({
            beforeSubmit:  checkForm, 
            success:  complete, 
            dataType: 'json'
        });
        function checkForm(){
            if( $.trim($('#password').val()) != $.trim($('#repassword').val())){
                alert('两次输入的新密码不一致！');
                return false;
            }
        }
        function complete(data){
            alert(data.info);
        }
    });

</script>
<div class="memberbox">   
        <div class="memberleft">
            <include file="Member:left" />
        </div>
        <div class="memberright">
            <div class="member_detail">修改密码</div>
            <form method='post' id="form1" name="form1" action="{:U('Member/changePwd')}">
                
                <table border="0" cellspacing="3" cellpadding="3">
                    <tbody>
                        <tr>
                            <th>旧密码：</th>
                            <td><input type="password" name="oldpassword"></td>
                        </tr>
                     
                        <tr>
                            <th>新密码：</th>
                            <td><input type="password" name="password" id="password"></td>
                        </tr>
                        <tr>
                            <th>确认新密码：</th>
                            <td><input type="password" name="repassword" id="repassword"></td>
                        </tr>
                        <tr>
                            <th>验证码：</th>
                            <td><input type="text" name="verify" style="width: 95px; margin-right: 5px;"><img id="verifyImg" src="{:U('Member/verify')}" border="0" alt="点击刷新验证码" align="absmiddle"></td>
                        </tr>
                    </tbody>
                </table>
     
                <div class="form_b">
                    <input type="submit" class="submit btn7" id="submit" value="提 交">
                </div>
            </form>
        </div>

</div>

<include file="Public:footer" />